﻿@model PhotoGallery.Models.PhotoInfo
@using PhotoGallery.Views

@{
    ViewBag.Title = "Create";
}

<h2>@Labels.add</h2>

@using (Html.BeginForm("Create","Photo",FormMethod.Post,new {enctype = "multipart/form-data"})) {
    <fieldset>
        <legend>@Labels.photo</legend>
        @Html.ValidationSummary(true)

        <div class="editor-label">
            @Labels.uploadFiles:<br>
        </div>
        <div class="editor-field">
            <input type="file" name="files" multiple="multiple"  accept="image/*" />
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        <p>
            <input type="submit" value="@Labels.save" />
            <a href="@Html.Encode(ViewBag.backUrl)" class="button-link-100" >@Labels.cancel </a>
        </p>
    </fieldset>
}

